<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
			<script>
						setInterval(function(){
							console.log("定时执行")
							
							var d1 = new Date(); // 当前时间
							var timeStr = d1.getFullYear()+"-";
							timeStr += (d1.getMonth()+1)+"-";
							timeStr +=d1.getDate()+" ";
							timeStr +=d1.getHours()+":";
							timeStr +=d1.getMinutes()+":";
							timeStr +=d1.getSeconds()+".";
							timeStr +=d1.getMilliseconds();
							
							console.log(timeStr);
							timeDiv.innerHTML = timeStr;
						},10);
						
						
					</script>
	</body>
</html>
